<template>
  <div>
    <h1>熊大</h1>
    <button @click="giveDi">给熊二蜂蜜罐</button>
    <button @click="giveZhier">给小熊二蜂蜜罐</button>
    <button @click="giveApp">把蜂蜜罐传递给父级APP</button>
    <xiao-xiong-da></xiao-xiong-da>
  </div>
</template>

<script>
import XiaoXiongDa from "./XiaoXiongDa.vue";
/* 
需求：熊大有个蜂蜜罐 传递 熊二



*/
export default {
  components: { XiaoXiongDa },
  data() {
    return {
      msg: "蜂蜜罐",
    };
  },
  mounted() {},
  methods: {
    giveDi() {
      this.$eventBus.$emit("geGive", this.msg);
    },
    giveZhier() {
      this.$eventBus.$emit("dabaigive", this.msg);
    },
    giveApp() {
      this.$emit("test", this.msg);
    },
  },
};
</script>

<style lang="scss" scoped>
</style>